Search
Use
The Search control allows searches over entities based on one or more attributes that act as keys.
Considerations
- An additional window is used to enter the search criteria and present results, wherein the end user will be able to select the desired value.
- When a search criterion is filled and Bizagi finds matches for the information, a table will be presented with the information.
- Searches can be approximate or exact. When using approximate searches, Bizagi will search over the records using the first three letters entered in a search text box.
- Make sure the control is editable. If read-only, the end user will not be able to perform any searches.
- The results can be sorted by defining the attribute and the order in the Search form.
Related to attribute types
Search controls are related to attributes with relationships to Master, Parameter, and System entities.
When a Master entity is dragged to the Display Area, Bizagi will automatically interpret it as a Search Control.
To use a Search control in Parameter or System entities, right-click the control, select Convert to, and then choose the Search control option.
Properties
Every control has a set of properties that allow customization of its behavior in the Work Portal. Some properties are exclusive to specific controls. The following properties belong exclusively to the Search control:
Basic tab
Search form
Defines the form used to instigate searches.
This form is divided into two sections:
- The search criteria that includes the attributes of the entity to search on, for example, Customer.
- The search results that include the attributes of the records found, for example, Address, Telephone, etc.
Display attribute
Defines the attribute of the entity for display in the Work Portal.
For example, the City entity has three attributes: City name, City Area code, and City initials. To easily recognize the City, the Display Attribute can be set to City name.
Advanced tab
Submit on change
This property is deprecated. We suggest using Actions and Validations.
When enabled, selecting a value from the control will refresh the form and execute all Actions, Validations, and visibility rules, saving what has been entered.
Allow full search
If selected, the search will be performed to match ANY part of the content of the Display attribute.
For example, searching over the Customer entity in the attribute Name.
There is a customer named Julie Jackson. If the end user types "acks," Bizagi will find this record, as the entered string is found within the Name.
By default, this property is disabled, and the prediction is based on the first letter of the target word. Enabling it ensures more accurate searches.
Allow clear
Enables end users to clear the data filled from a previous search.
Max records
Defines the maximum number of results that can be displayed. Bizagi displays 10 records by default.
Filter
Allows you to define a smaller set of values from the list of all possible values in the entity. Bizagi will only display the records that meet the filter condition defined in a Boolean expression.
Allow new records
Enables the possibility to add new records to the entity on which the search is based.
New records form
Displays the form to enter all the data of the new record to be added.
This property is required when new records are allowed (when the Allow new records property is enabled).
Allow clear example
Note the Customer information, namely the Address and Telephone control entries, are cleared.
Example
In a Purchase Request Process, it is necessary to search for the Customer. Consequently, a Search control is required.
- You need a Master entity in which all the Customer's information is stored. There must be an attribute in the Process Entity pointing to the Master entity. This is done using a related attribute relationship between Purchase Request (Process Entity) and Customer (Master entity).
- In the Forms Designer, identify the Customer attribute. Drag and drop it in the Design area.
When you drag and drop an attribute with a related entity relationship (to a Master entity), it will be interpreted in Bizagi as a Search control.
- Select a Search form and a Display attribute.
In this case, the search form was previously created, and the Display attribute will be the customer's name.
- Enable the Allow new records option and select a New records form (Add_Customer).
- In the form, add the Customer's attributes to be returned in the search result. We will include the customer's gender and telephone. They will be read-only because once loaded, they should not be altered.
- In the Work Portal, the Customer control will be a Search control. End users can search with the given criteria and select the record that matches their requirements.
- If a new record must be created, it will be done within the Search form.
Updating information in the form after searching records
When you select a record in the search results
Bizagi does not update the attributes related to the record selected in the task form.
To do that, you have to create an activity action that refreshes the control of attributes you want to update after selecting the record in the search form.